<?php 
if ( !function_exists('p') ) {
function p($var=""){
	$debug = debug_backtrace();
	print "<br/>";
	print "File debug: ". basename($debug[0]["file"]) . "<br/>\n";
	print "Line debug: ". $debug[0]["line"] . "<br/>\n";
	print "Value debug: ". $debug[0]["args"][0] . "<br/>\n";
	
	// print var_dump(debug_backtrace()); 

}
}

if ( !function_exists('pd') ) {
function pd($var=""){
	$debug = debug_backtrace();
	print "<br>";
	print "File debug: ". basename($debug[0]["file"]) . "<br/>\n";
	print "Line debug: ". $debug[0]["line"] . "<br/>\n";
	print "Value debug: ". $debug[0]["args"][0] . "<br/>\n";
	die();
	// print var_dump(debug_backtrace()); 

}
}
if ( !function_exists('pr') ) {
function pr($var=array()){
	$debug = debug_backtrace();
	print "<br>";
	print "File debug: ". basename($debug[0]["file"]) . "<br/>\n";
	print "Line debug: ". $debug[0]["line"] . "<br/>\n";
	print "Value debug: ". "<br/>\n";
	print "<pre>";
	print_r($debug[0]["args"][0]);
	print "</pre>";
	print "<br/>";
}
}
if ( !function_exists('prd') ) {
function prd($var=array()) {
	$debug = debug_backtrace();
	print "<br>";
	print "File debug: ". basename($debug[0]["file"]) . "<br/>\n";
	print "Line debug: ". $debug[0]["line"] . "<br/>\n";
	print "Value debug: ". "<br/>\n";
	print "<pre>";
	print_r($debug[0]["args"][0]);
	print "</pre>";
	print "<br/>";
	die();
}
}
if ( !function_exists('pj') ) {
function pj($var=""){
	$debug = debug_backtrace();
	$json_return = array('File:'=>basename($debug[0]["file"]),'Line:'=>$debug[0]["line"],'Value:'=>$debug[0]["args"][0]);
	print $json_return;	
}
}
if ( !function_exists('pjd') ) {
function pjd($var=""){
	$debug = debug_backtrace();
	$json_return = array('File:'=>basename($debug[0]["file"]),'Line:'=>$debug[0]["line"],'Value:'=>$debug[0]["args"][0]);
	die( $json_return );	
}
}
if ( !function_exists('prj') ) {
function prj($var=""){
	$debug = debug_backtrace();
	$json_return = array('File:'=>basename($debug[0]["file"]),'Line:'=>$debug[0]["line"],'Value:'=>$debug[0]["args"][0]);
	print_r( $json_return );	
}
} 
if ( !function_exists('prjd') ) {
function prjd($var=""){
	$debug = debug_backtrace();
	$json_return = array('File:'=>basename($debug[0]["file"]),'Line:'=>$debug[0]["line"],'Value:'=>$debug[0]["args"][0]);
	print_r( $json_return );	
	die();
}
}
?>